package com.jiangjiang.eshop.cart.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;

import java.util.Date;

/**
 * @ClassName ShoppingCartItemEntity
 * @Description TODO
 * @Author jhw
 * @Date 2021/6/1 22:28
 * @Version 1.0
 **/
@Data
@Builder
@ToString
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode
@TableName("shopping_cart_item")
public class ShoppingCartItemEntity {

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 购物车id
     */
    @TableField("shopping_cart_id")
    private Long shoppingCartId;

    /**
     * 商品skuid
     */
    @TableField("goods_sku_id")
    private Long goodsSkuId;

    /**
     * 购买数量
     */
    @TableField("purchase_quantity")
    private Long purchaseQuantity;

    /**
     * 创建时间
     */
    @TableField(value = "gmt_create", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date gmtCreate;

    /**
     * 更新时间
     */
    @TableField(value = "gmt_modified", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date gmtModified;
}
